home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_olv_whipcam.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  93 lines

  1. # Jones 3D Cog Script
  2. #
  3. # gen_whip cam.cog
  4. #
  5. # Generic whip swing camera offset Script
  6. #
  7. # [CMG]
  8. #
  9. # [DS] Added music cue.
  10. #
  11. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  12. # ========================================================================================
  13.  
  14. symbols
  15.     
  16.  
  17.     #..................MESSAGES................
  18.     message        damaged        
  19.     message        startup        
  20.  
  21.     
  22.     #..................ACTORS................
  23.     thing        player                              local
  24.     
  25.  
  26.     #..................CAMERAS................
  27.     thing       swingCam                  
  28.     
  29.     #..................PROPS................
  30.     thing        whipstrut
  31.  
  32.     #..................SOUNDS................
  33.     sound       sndFalling=gen_fallingrock_c.wav        local
  34.     sound        music0=mus_gen_indywhip1.wav            local
  35.             
  36.     #..................VARIABLES................
  37.     int            curCam                    local
  38.     int        musplayed=0                    local
  39.     
  40.     
  41. end
  42.  
  43. # ========================================================================================
  44. code
  45.  
  46. startup:
  47.  
  48.     player=GetLocalPlayerThing();
  49.  
  50. return;
  51. # ========================================================================================
  52.  
  53. damaged:
  54.  
  55. if ((GetSenderRef() == whipstrut) && (GetParam(1) == 0x10))
  56.     {
  57.         # Indy whips across the gap...
  58.         
  59.         # Prep...
  60.         StartCutScene(1);
  61.         SetActorFlags(player, 0x200000);
  62.         curCam = GetCurrentCamera();
  63.         SetCameraPosInterp(2, 0); # kill dolly
  64.         SetCameraLookInterp(2, 0); # kill pan & tilt
  65.         Sleep(1.0);
  66.         
  67.         # move cam to known position with a wide angle
  68.         SetExtCamOffsetToThing(swingCam);
  69.             SetCameraFOV(100, 1, 1.0);
  70.         Sleep(1.0);
  71.  
  72.         # sound and object creation for collapsing whip strut
  73. #        PlaySoundLocal(sndFalling, 1.0, 0.0, 0x0, 0);
  74.  
  75.         #indy whip music cue.
  76.         if(musplayed == 0)
  77.         {
  78.         musplayed=1;
  79.         PlaySoundLocal(music0, 1.0, 0.0, 0x0, 0);
  80.         }
  81.         Sleep(0.5);
  82.         RestoreExtCam();
  83.         SetCameraFOV(90, 1, 0.25);
  84.         Sleep(2.0);
  85.         ClearActorFlags(player, 0x200000);
  86.         EndCutScene();
  87.     }
  88. return;
  89. # ========================================================================================
  90.     
  91. end
  92.  
  93.